home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
wlib11_2.zip
/
EXAMPLES.EXE
/
EXAM57.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-03-13
|
674b
|
21 lines
#include "window.h"
#include <string.h>
#define NORM CREATE_VIDEO_ATTRIBUTE(black,white)
#define DATEMASK "__/__/__"
char buf1[] = "12/34/56";
char buf2[9];
WPOINTER w;
main()
{
memset(buf2,0,sizeof(buf2));
WindowInitializeSystem();
WindowSaveInitial(0);
w = WindowInitialize(BORDER,1,1,40,10,NORM,NORM,SINGLEBOX);
WindowOpen(w);
WindowDisplay(w,1,NOEFFECT);
TranslateMaskStringToString(buf1,DATEMASK,buf2,'_');
WindowPrintf(w,"The original string is %s\n"
"The untranslated string is %s\n", buf1,buf2);
}